(a) Field of the Invention
The invention relates to an image processing method, and particularly to a gamma image correction method.
(b) Description of the Related Art
In general, image output or image input processing must provide a picture with smooth brightness variation for human eyes to see. As shown in FIG. 1, when an original image data with the brightness variation from very dark to very bright is transmitted to a display device without any correction process via image receiving or image capturing system, due to the influence of the response curve (as illustrated by the curve on the left hand side in FIG. 1) of the display device and other electronic devices, the original image data experience non-linear variations that cause human eyes to see intense contrast and feel very uncomfortable.
Generally, the method used to solve such problem is the gamma correction method to perform correcting processing. At first, a gamma correction curve (such as the middle curve in FIG. 1), corresponding to the original image curve, is provided in a graphic processor (not shown in the figure). Then the original image is sent to the graphic processor for mapping processing accompanying with the gamma correction curve so that the display device generates an almost linear smooth curve (such as the curve on the right hand side in FIG. 1). Therefore, the image seen by human eyes appears to be an image shown by a smooth curve. The image has smoother brightness variation and better contrast effect.
FIG. 2A illustrates a graphic processor 20 generally for carrying out a gamma correction process. If the data of each point of the original image data is represented by N bits, then the graphic processor 20 contains a memory unit that stores 2N reference nodes. The combination of the 2N reference nodes is generally called “Look Up Table (LUT)”. Look up table is the table that contains the corresponding original image numbers and grey scales. The graphic processor 20 receives an N-bit original image data point Or and performs the corresponding operation on the original image data Or according to the look up table to generate an almost linear N-bit corrected image data T. The memory unit storing the 2N reference nodes can be static random access memory (SRAM) or read-only memory (ROM). FIG. 2B shows an example of a general graphic processor 20. As the input original image data point Or is represented by N=10 bits, then the graphic processor 20 uses a memory unit M (i.e. 210) and a multiplexer MUX to provide one corresponding conversion value for each of the original image data point Or to perform conversion and thereby obtain the corrected image parameter value. Therefore, the graphic processor 20 consumes 1024 units of the memory space. Although the corrected image becomes very fine, the cost of the whole graphic processing device is higher as the input image data is represented by more bits.
In order to overcome the problems of large required memory space and increased cost, FIG. 3A illustrates another graphic processor 30 in the prior art used for image correction. Only a little memory space is provided in graphic processor 30 for storing the image conversion value. For example, when the input original image data point Or is still represented by N=10 bits, although the original image data point can have 1024 possible values, the graphic processor 30 does not have 1024 units of the memory space like that described in FIG. 2B. It only uses a memory unit M′ (for example, it has less than 1024 units of the memory space and has 64 units of the memory space.) together with two multiplexers MUX1 and MUX2, a control unit CU, two multipliers m1 and m2, and two adders a and a′ and then uses the interpolation method for image correction. When the corresponding conversion value of the original image data point Or is not stored in the memory unit M′, the graphic processor 30 uses the two conversion values that are nearest to the original image data point Or in the interpolation operation to calculate the corrected image parameter value of the original image data point Or. As shown in FIG. 3B, if the two conversion values of the nodes A and B are already stored in the memory unit M′ and the value of the original image data point Or is between the corresponding input image value of the nodes A and B, the corrected image parameter value Y of the original image data point Or is thus calculated.
Since the original image data point Or is represented by N=10 bits and the memory unit M′ has only 64 (that is 26) units of the memory space, the four least significant bits (LSBs) determine how to utilize the nodes A and B for interpolation. When the control unit CU receives the image parameter value to be calculated, it accompanies with the memory unit M′ and the multiplexers MUX1 and MUX 2 to find the two nodes A and B that are nearest to the image parameter value and to determine the value of the LSBs of the image parameter value. Finally, it calculates the corrected image parameter value of the original image data point Or by interpolating from the nodes A and B. The equation for the above interpolation operation is given by:
                    Y        =                  A          +                                    (                              B                -                A                            )                        ⁢                          LSBs              16                                                          (        1        )            
However, after the graphic processor 30 carries out the correction, since most of the corrected image parameter values are calculated from interpolation, the corrected image curve RV has too many obvious turning points, such as A′, B′, C′, D′, . . . , shown in FIG. 3C. These turning points cause intense image brightness variation and undesired creases appeared in the displayed picture.